<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class TablasMaestra extends CI_Controller {
    
      function __construct() {
        parent::__construct();
    
        $this->form_data = new stdClass();
        if (!empty($this->session->userdata['nombre'])) {
            $this->form_data->nom = $this->session->userdata['nombre'];
            $this->form_data->ape = $this->session->userdata['apellido'];
            $this->form_data->suc = $this->session->userdata['sucursal'];
            $this->load->helper('navigation');
        } else {
            redirect("acceso");
        }
    } 
    //carga el mantenedor clientes
        public function clientes() {     
        $this->pagina("clientes_view", array());
    }
    
    public function formularioClientes() {     
        $this->pagina("formCliente_view", array());
    }
    
      private function pagina($vista, $data) {
        $this->load->model("panel_model");
        $menu["logistica"] = "active open";
        $user = $this->session->userdata['codigo'];
        $params = array($user, 1);
        $menu["menu"] = $this->panel_model->menu($params);
        $this->load->view('estructura/head');
        $this->load->view('estructura/madmin', $menu);
        $this->load->view('intranet/ventas/' . $vista, $data);
        $this->load->view('estructura/footer');
    }  
    
    
}
?>